package com.oilsection.demo.controller;

import com.oilsection.demo.entity.*;
import com.oilsection.demo.service.OverviewInfoService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author yangyuge
 * @description
 * @Date 2024/5/3 16:08
 */
@RestController
public class OverviewInfoController {
    @Resource
    private OverviewInfoService overviewInfoService;

    @CrossOrigin
    @GetMapping("/getQverviewKqInfo")
    public overviewKqInfo getQverviewKqInfo() {
        return overviewInfoService.getQverviewKqInfo();
    }

    @CrossOrigin
    @GetMapping("/getOverviewJcdInfo")
    public overviewJcdInfo getOverviewJcdInfo() {
        return overviewInfoService.getOverviewJcdInfo();
    }

    @CrossOrigin
    @GetMapping("/getOverviewHisInfo")
    public overviewHisInfo getOverviewHisInfo() {
        return overviewInfoService.getOverviewHisInfo();
    }
    
    @CrossOrigin
    @GetMapping("/getOverviewEventInfo")
    public dmJceventInfo getOverviewEventInfo(String kqName, String dealSection, String eventType, String findTime, String jzId, String jzName, int page, int pageSize) {
        return overviewInfoService.getOverviewEventInfo(kqName, dealSection, eventType, findTime, jzId, jzName, page, pageSize);
    }

    @CrossOrigin
    @GetMapping("/getSpecKqKqInfo")
    public List<Map<String, String>> getSpecKqKqInfo(String id) {
        return overviewInfoService.getSpecKqKqInfo(id);
    }

    @CrossOrigin
    @GetMapping("/getSpecKqJcdInfo")
    public dmJcdInfo getSpecKqJcdInfo(String jcEventId, String kqName, String jzId, String jzName, String jcdId, String jcdName, String jcState, int page, int pageSize, String id) {
        return overviewInfoService.getSpecKqJcdInfo(jcEventId, kqName, jzId, jzName, jcdId, jcdName, jcState, page, pageSize, id);
    }
    
    @CrossOrigin
    @GetMapping("/getSpecKqHisInfo")
    public overviewHisInfo getSpecKqHisInfo(String id) {
        return overviewInfoService.getSpecKqHisInfo(id);
    }

    @CrossOrigin
    @GetMapping("/getSpecKqEventInfo")
    public dmJceventInfo getSpecKqEventInfo(String eventType, String findTime, String kqName, String dealSection, String jzId, String jzName, int page, int pageSize, String id) {
        return overviewInfoService.getSpecKqEventInfo(eventType, findTime, kqName, dealSection, jzId, jzName, page, pageSize, id);
    }
    
    @CrossOrigin
    @GetMapping("/getSpecJzJcdInfo")
    public dmJcdInfo getSpecJzJcdInfo(String jcEventId, String jcdId, String jcdName, String jzId, String jzName, String runState, String kqName, int page, int pageSize) {
        return overviewInfoService.getSpecJzJcdInfo(jcEventId, jcdId, jcdName, jzId, jzName, runState, kqName, page, pageSize);
    }

    @CrossOrigin
    @GetMapping("/getSpecJzJcEventInfo")
    public dmJceventInfo getSpecJzJcEventInfo(String eventType, String findTime, String kqName, String dealSection, String jzId, String jzName, int page, int pageSize) {
        return overviewInfoService.getSpecJzJcEventInfo(eventType, findTime, kqName, dealSection, jzId, jzName, page, pageSize);
    }

    @CrossOrigin
    @GetMapping("/getSpecJzHisInfo")
    public overviewHisInfo getSpecJzHisInfo(String jzId) {
        return overviewInfoService.getSpecJzHisInfo(jzId);
    }

}
